package nsu.edu.zsq.controller.teacher;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import nsu.edu.zsq.param.ExamTeacherParam;
import nsu.edu.zsq.service.teacher.ExamService;

/** 
* Description: 教师考试安排的controller类<br>
*/
@RequestMapping("/teacher/exam")
@Controller
public class ExamController {
    
    @Autowired
    private ExamService examService;

    /**
     * 跳转到教师考试安排页面，携带考试安排信息
     * @param model
     * @return String teacher/exam/exam_list.html
     */
    @RequestMapping("/toExam_list")
    public String toExam_list(Model model) {
        List<ExamTeacherParam> listExamTeacher = examService.listExamTeacher();
        model.addAttribute("listExamTeacher", listExamTeacher);
        return "teacher/exam/exam_list.html";
    }
}
